/**
 * 
 */
package com.gosophia.orgManagement.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.exception.BusinessException;
import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.commons.web.logAnnotation.LogRecord;
import com.gosophia.organizationManagement.dto.OrganizationDTO;
import com.gosophia.organizationManagement.ws.OrganizationManagementWebService;
import com.opensymphony.xwork2.ActionContext;

/**
 * 修改机构用action
 * @author wangxinbing
 * @since  2010-12-31
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
@Controller("ModifyOrganizationInfoAction")
@Scope("prototype")

public class ModifyOrganizationInfoAction extends BaseSupportAction {
    
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @Autowired
    private OrganizationManagementWebService organizationManagementWebService;
    private OrganizationDTO organizationDTO;
    private OrganizationDTO orgDTO;
    @LogRecord(eventAction="机构管理-更新机构",eventTarget="organizationDTO")
    @Override
    public String _execute()throws Exception{
            orgDTO = organizationManagementWebService.updateOrganization(organizationDTO);
            super.getRequestResult().setRsltCode("0");
            super.getRequestResult().setMessage("更新机构成功");
            return SUCCESS;
    }

    public OrganizationDTO getOrganizationDTO() {
        return organizationDTO;
    }

    public void setOrganizationDTO(OrganizationDTO organizationDTO) {
        this.organizationDTO = organizationDTO;
    }

    public OrganizationDTO getOrgDTO() {
        return orgDTO;
    }

    public void setOrgDTO(OrganizationDTO orgDTO) {
        this.orgDTO = orgDTO;
    }


    
}
